www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminTemplates_qiye\D_update_a_template_do.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>





<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->
<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->

<!--#include file=../../inc/functionFiless.asp-->

<!--#include file=../../inc/ND_class_function.asp-->





<%
AJAXshowLoader()

%>


<%


call  all_update_qiantai_web_filenames_config_xml()

ss4=request("fname")





strDBPath12= left(ss4,instrrev(ss4,"/"))


sssssss1=""
for i=1 to len(ss4)

if mid(ss4,len(ss4)-i+1,1)="/" then

sssssss1=i
exit for
end if
next


if sssssss1<>"" then
sssssss1=right(ss4,sssssss1-1)
else
sssssss1=ss4
strDBPath12=""
end if




'strDBPath1=路径
'filename=文件名
filename2=sssssss1









sssddd1=left(request("fname"),len(request("fname"))-1)

ss4=request("pname")&"/"&sssddd1





strDBPath1= left(ss4,instrrev(ss4,"/"))


sssssss1=""
for i=1 to len(ss4)

if mid(ss4,len(ss4)-i+1,1)="/" then

sssssss1=i
exit for
end if
next


if sssssss1<>"" then
sssssss1=right(ss4,sssssss1-1)
else
sssssss1=ss4
strDBPath1=""
end if




'strDBPath1=路径
'filename=文件名
filename=sssssss1



ddddss=loadfile("../../templates/"&ss4)




'response.write dddd

'response.end


set filea=new Cls_FSO
set fileb=new DosAsp 


set rs1=server.CreateObject("adodb.recordset")
       
rs1.open "select * from ND_templates_folder_reg_qiye where id="&request("pid"),conn,1,1

if rs1("is_default_template")=true then



eee1=sssddd1

extnm=lcase(mid(eee1,inStrRev(eee1,".")+1,len(eee1)-inStrRev(eee1,".")))



if instr(1,eee1,"{",1)=0 and instr(1,eee1,"}",1)=0  then

sss111=filea.ShowFileAccessInfo(server.mappath("../../templates/"&ppath&sssd&eee1),7)
else

sss111=0
end if





if (sss111/1024)<300 and (extnm="asp" or extnm="aspx" or extnm="js" or extnm="css" or extnm="php"  or extnm="htm"   or extnm="html"   or extnm="shtml"  or extnm="jsp") then 


complie_dir="../../"&nd_web_admin_folder&"/"&"adminKernel/"

cpml_is_cms=0
cont222=replace_label_main(ddddss,"templates/"&ss4)

call savefile(cont222,"../../"&nd_web_output_folder_qiye&"/"&trim(sssddd1))
status1="更新成功"

else




status1="更新成功"

call createfile("../../"&nd_web_output_folder_qiye&"/"&sssddd1,"1111",true)



call deletefile("../../"&nd_web_output_folder_qiye&"/"&sssddd1)


if filea.CopyAFile(server.mappath("../../templates/"&ss4), server.mappath("../../"&nd_web_output_folder_qiye&"/"&sssddd1))<>1 then
status1="更新失败"
end if







end if





Application.Lock()
Application("newdsoft_web_user_mdb_using")="no"
Application("newdsoft_web_user_mdb_when_using")=now()
Application.UnLock()




%>

<script language=javascript>

alert("<%=status1%>");






<%
'sttstrr="webname_settings"
sttstrr="webname_settings_qiye"

	
biao3="[ND_sys]"
	
set rs22d=server.CreateObject("adodb.recordset")
rs22d.open "select top 1 * from "&biao3&" where type='"&sttstrr&"'",conn,1,1
	
	ddd1d=rs22d("data")
	

dddd12d=split(ddd1d,"|")

hhhta=cstr(dddd12d(4))
hhhtax=cstr(dddd12d(5))
htm_ext_ming=mid(hhhtax,2,len(hhhtax))	
	
	
if clng(hhhta)=1 then
%>


alert("你开启了全站生成htm功能,所以还要去刷新各htm页,请进入各生成htm功能菜单里生成各htm页");


<%	
	
	
end if	
	
	
	%>










window.close();

</script>



<%

else


%>



<script language=javascript>

alert("此子模板所在的模板不是当前默认模板,不需要刷新其对应的前台页面");
window.close();

</script>



<%end if%>


















<%

AJAXcloseLoader()
%>